Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release builder] gov proposal simulation: show gas usage + add gas profiling support #15304

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

vgao1996
Copy link
Contributor

This enhances the governance proposal simulation tool by adding the following features:

  1. Gas usage display
  2. Option to generate gas profiling reports (enabled with the --profile-gas flag)

Without --profile-gas

Executing governance scripts...
    0-gas-schedule.move
        Gas used: 215
        Success
    1-move-stdlib.move
        Gas used: 471
        Success
    2-aptos-stdlib.move
        Gas used: 1669
        Success
    3-aptos-framework.move
        Gas used: 4393
        Success
    4-aptos-token.move
        Gas used: 144
        Success
    5-aptos-token-objects.move
        Gas used: 151
        Success
All scripts succeeded!
All proposals succeeded!

With profile-gas

Executing governance scripts...
    0-gas-schedule.move
        Gas report saved to output/sources/TBD/proposal_1_upgrade_framework/gas-profiling/0-gas-schedule
        Gas used: 215
        Success
    1-move-stdlib.move
        Gas report saved to output/sources/TBD/proposal_1_upgrade_framework/gas-profiling/1-move-stdlib
        Gas used: 471
        Success
    2-aptos-stdlib.move
        Gas report saved to output/sources/TBD/proposal_1_upgrade_framework/gas-profiling/2-aptos-stdlib
        Gas used: 1669
        Success
    3-aptos-framework.move
        Gas report saved to output/sources/TBD/proposal_1_upgrade_framework/gas-profiling/3-aptos-framework
        Gas used: 4393
        Success
    4-aptos-token.move
        Gas report saved to output/sources/TBD/proposal_1_upgrade_framework/gas-profiling/4-aptos-token
        Gas used: 144
        Success
    5-aptos-token-objects.move
        Gas report saved to output/sources/TBD/proposal_1_upgrade_framework/gas-profiling/5-aptos-token-objects
        Gas used: 151
        Success
All scripts succeeded!
All proposals succeeded!

Copy link

trunk-io bot commented Nov 18, 2024

⏱️ 2h 50m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
forge-framework-upgrade-test / forge 25m 🟥🟥
execution-performance / test-target-determinator 14m 🟩🟩🟩
test-target-determinator 14m 🟩🟩🟩
rust-move-tests 13m 🟩
rust-move-tests 12m 🟩
rust-move-tests 12m 🟩
rust-move-tests 12m 🟩
check 11m 🟩🟩🟩
rust-move-tests 10m
check-dynamic-deps 9m 🟩🟩🟩🟩🟩 (+1 more)
rust-cargo-deny 9m 🟩🟩🟩🟩 (+1 more)
rust-doc-tests 5m 🟩
rust-doc-tests 5m 🟩
fetch-last-released-docker-image-tag 5m 🟩🟩🟩
rust-doc-tests 5m 🟩

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
check-dynamic-deps 3m 1m +99%

settingsfeedbackdocs ⋅ learn more about trunk.io

aptos-move/aptos-release-builder/src/main.rs Show resolved Hide resolved
aptos-move/aptos-release-builder/src/main.rs Outdated Show resolved Hide resolved
@vgao1996 vgao1996 enabled auto-merge (squash) November 18, 2024 20:19
@vgao1996 vgao1996 disabled auto-merge November 18, 2024 23:32
@vgao1996 vgao1996 enabled auto-merge (squash) November 18, 2024 23:32

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 54facf268aa73ea10d95cce3ac6d8f8b19c3b133

two traffics test: inner traffic : committed: 14314.28 txn/s, latency: 2777.99 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 3300 ms), latency samples: 5442620
two traffics test : committed: 100.00 txn/s, latency: 1663.08 ms, (p50: 1400 ms, p70: 1400, p90: 1600 ms, p99: 10400 ms), latency samples: 1780
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 2.023, avg: 1.579", "ConsensusProposalToOrdered: max: 0.317, avg: 0.294", "ConsensusOrderedToCommit: max: 0.379, avg: 0.367", "ConsensusProposalToCommit: max: 0.673, avg: 0.661"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.99s no progress at version 25331 (avg 0.20s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.60s no progress at version 2788803 (avg 8.60s) [limit 15].
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 54facf268aa73ea10d95cce3ac6d8f8b19c3b133

Compatibility test results for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 54facf268aa73ea10d95cce3ac6d8f8b19c3b133 (PR)
Upgrade the nodes to version: 54facf268aa73ea10d95cce3ac6d8f8b19c3b133
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1326.63 txn/s, submitted: 1331.02 txn/s, failed submission: 4.38 txn/s, expired: 4.38 txn/s, latency: 2347.52 ms, (p50: 2100 ms, p70: 2400, p90: 3500 ms, p99: 4700 ms), latency samples: 121020
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1361.97 txn/s, submitted: 1364.59 txn/s, failed submission: 2.63 txn/s, expired: 2.63 txn/s, latency: 2212.77 ms, (p50: 2100 ms, p70: 2400, p90: 3300 ms, p99: 4500 ms), latency samples: 124420
5. check swarm health
Compatibility test for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 54facf268aa73ea10d95cce3ac6d8f8b19c3b133 passed
Upgrade the remaining nodes to version: 54facf268aa73ea10d95cce3ac6d8f8b19c3b133
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1427.27 txn/s, submitted: 1429.13 txn/s, failed submission: 1.87 txn/s, expired: 1.87 txn/s, latency: 2351.31 ms, (p50: 2100 ms, p70: 2400, p90: 4000 ms, p99: 5400 ms), latency samples: 122380
Test Ok

Copy link
Contributor

✅ Forge suite compat success on be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 54facf268aa73ea10d95cce3ac6d8f8b19c3b133

Compatibility test results for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 54facf268aa73ea10d95cce3ac6d8f8b19c3b133 (PR)
1. Check liveness of validators at old version: be3ccc58ef518259d63fab7f3e3613f2a6214268
compatibility::simple-validator-upgrade::liveness-check : committed: 16856.44 txn/s, latency: 1989.73 ms, (p50: 2000 ms, p70: 2100, p90: 2400 ms, p99: 3000 ms), latency samples: 548340
2. Upgrading first Validator to new version: 54facf268aa73ea10d95cce3ac6d8f8b19c3b133
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 7684.14 txn/s, latency: 3697.66 ms, (p50: 4100 ms, p70: 4400, p90: 4500 ms, p99: 4600 ms), latency samples: 142520
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 6879.31 txn/s, latency: 4362.23 ms, (p50: 4500 ms, p70: 4600, p90: 4700 ms, p99: 6200 ms), latency samples: 259100
3. Upgrading rest of first batch to new version: 54facf268aa73ea10d95cce3ac6d8f8b19c3b133
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 7558.28 txn/s, latency: 3784.45 ms, (p50: 4300 ms, p70: 4400, p90: 4500 ms, p99: 4700 ms), latency samples: 140820
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 7668.56 txn/s, latency: 4193.82 ms, (p50: 4500 ms, p70: 4600, p90: 4700 ms, p99: 4700 ms), latency samples: 254520
4. upgrading second batch to new version: 54facf268aa73ea10d95cce3ac6d8f8b19c3b133
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 10296.33 txn/s, latency: 2680.89 ms, (p50: 2700 ms, p70: 2800, p90: 4200 ms, p99: 4400 ms), latency samples: 202660
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 10816.22 txn/s, latency: 2893.61 ms, (p50: 2600 ms, p70: 2700, p90: 5600 ms, p99: 6900 ms), latency samples: 349400
5. check swarm health
Compatibility test for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 54facf268aa73ea10d95cce3ac6d8f8b19c3b133 passed
Test Ok

@vgao1996 vgao1996 merged commit 11490b5 into aptos-labs:main Nov 19, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants